/*
 * read_grammar.h
 *
 *  Created on: Mar 29, 2015
 *      Author: silivas
 */

#ifndef SRC_READ_GRAMMAR_H_
#define SRC_READ_GRAMMAR_H_

#include <cstdio>
#include <iostream>
#include <string>
#include <fstream>
#include "gramar.h"

Grammar read_grammar_from_file(const string& filename){
	Grammar grammar;
	string line;
	ifstream infile(filename);

	while(getline(infile, line)){
		grammar.add_category(line);
	}
	return grammar;
}


#endif /* SRC_READ_GRAMMAR_H_ */
